xen/domain: Add vmtrace_size domain creation parameter
authorMichał Leszczyński <michal.leszczynski@cert.pl>
Thu, 2 Jul 2020 23:16:10 +0000 (01:16 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 5 Feb 2021 17:37:27 +0000 (17:37 +0000)
commit217dd79ee29286b85074d22cc75ee064206fb2af
tree0174358b22579cd0b15094bf4ded0d314e414413
parent34cc2e5f8dba6906da82fe8d76e839f9ab20f153
xen/domain: Add vmtrace_size domain creation parameter

To use vmtrace, buffers of a suitable size need allocating, and different
tasks will want different sizes.

Add a domain creation parameter, and audit it appropriately in the
{arch_,}sanitise_domain_config() functions.

For now, the x86 specific auditing is tuned to Processor Trace running in
Single Output mode, which requires a single contiguous range of memory.

The size is given an arbitrary limit of 64M which is expected to be enough for
anticipated usecases, but not large enough to get into long-running-hypercall
problems.

Signed-off-by: Michał Leszczyński <michal.leszczynski@cert.pl>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/x86/domain.c
xen/common/domain.c
xen/include/public/domctl.h
xen/include/xen/sched.h